home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
net
/
dnet_src.lha
/
dnet
/
amiga
/
client
/
statdnet.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-11-27
|
673b
|
51 lines
/*
* STATDNET.C
*
* DNET (c)Copyright 1988, Matthew Dillon, All Rights Reserved.
*
* STATDNET [-Nnet]
*
*/
#include "defs.h"
void main ARGS((int, char **));
char buf[2048];
int
brk()
{
return(0);
}
void
main(ac,av)
char *av[];
{
int ok;
char *host = NULL;
printf("StatDNet V%s%s\n", VERSION, STATDNET_VERSION);
onbreak(brk);
{
short i;
for (i = 1; i < ac; ++i) {
if (strncmp(av[i], "-N", 2) == 0) {
host = av[i] + 2;
continue;
}
}
}
fflush(stdout);
buf[0] = 0;
ok = DStat(host, (APTR)buf, 2048);
if (ok)
write(1, buf, strlen(buf));
else
puts("DNET master port for network not found");
}